import request from '@/utils/request'
// 获取部门列表
export function getDeptList() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
// 新增部门接口函数
export function addDepartment(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 根据id获取部门详情
export function getDeptsDetailById(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'get'
  })
}
// 根据id编辑部门信息
export function editDepts(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
// 根据id删除部门信息
export function delDepts(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
